cmake_minimum_required(VERSION 3.20)
project(FileChecker)

set(CMAKE_CXX_STANDARD 14)
find_package(LLVM REQUIRED CONFIG)

message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")

include_directories(${LLVM_INCLUDE_DIRS})
add_definitions(${LLVM_DEFINITIONS})

add_executable(${CMAKE_PROJECT_NAME} FileCheck.cpp)

llvm_map_components_to_libnames(llvm_libs support core)

target_link_libraries(${CMAKE_PROJECT_NAME} ${llvm_libs})